package Date1204;

import java.util.Scanner;
public class Demo6 {
    //定义各边颜色
    public int front[] = {1, 1, 1, 1};
    public int back[] = {2, 2, 2, 2};
    public int left[] = {3, 3, 3, 3};
    public int right[] = {4, 4, 4, 4};
    public int up[] = {5, 5, 5, 5};
    public int down[] = {6, 6, 6, 6};
    //进行旋转操作
    public void reX() {
        //旋转后颜色变化的方块存入view
        int[] view = new int[8];
        view[0] = down[3];
        view[1] = down[2];
        view[2] = right[2];
        view[3] = right[0];
        view[4] = up[3];
        view[5] = up[2];
        view[6] = left[1];
        view[7] = left[3];
        //记录旋转后各个面的颜色
        up[2] = view[7];
        up[3] = view[6];
        right[0] = view[5];
        right[3] = view[4];
        down[2] = view[3];
        down[3] = view[2];
        left[1] = view[0];
        left[3] = view[1];
        //当前面（x四个面）颜色交换
        view[0] = front[0];
        view[1] = front[1];
        view[2] = front[2];
        view[3] = front[3];
        front[0] = view[2];
        front[1] = view[0];
        front[2] = view[3];
        front[3] = view[1];
    }

    public void reY() {
        int[] view = new int[8];
        //旋转后颜色变化的方块存入view
        view[0] = down[2];
        view[1] = down[0];
        view[2] = back[2];
        view[3] = back[0];
        view[4] = up[1];
        view[5] = up[3];
        view[6] = front[1];
        view[7] = front[3];
        //记录旋转后各个面的颜色
        up[1] = view[6];
        up[3] = view[7];
        back[0] = view[5];
        back[2] = view[4];
        down[2] = view[2];
        down[0] = view[3];
        front[1] = view[0];
        front[3] = view[1];
        //当前面（y四个面）颜色交换
        view[0] = right[0];
        view[1] = right[1];
        view[2] = right[2];
        view[3] = right[3];
        right[0] = view[2];
        right[1] = view[0];
        right[2] = view[3];
        right[3] = view[1];
    }

    public void reZ() {
        int[] view = new int[8];
        //旋转后颜色变化的方块存入view
        view[0] = front[0];
        view[1] = front[1];
        view[2] = right[0];
        view[3] = right[1];
        view[4] = back[0];
        view[5] = back[1];
        view[6] = left[0];
        view[7] = left[1];
        //记录旋转后各个面的颜色
        left[1] = view[0];
        left[0] = view[1];
        back[0] = view[6];
        back[1] = view[7];
        right[1] = view[5];
        right[0] = view[4];
        front[0] = view[2];
        front[1] = view[3];
        //当前面（z四个面）颜色交换
        view[0] = up[0];
        view[1] = up[1];
        view[2] = up[2];
        view[3] = up[3];
        up[0] = view[2];
        up[1] = view[0];
        up[2] = view[3];
        up[3] = view[1];
    }
    public void run(String s){
        String[] d = s.split("");

        for (int i = 0; i < d.length; i++) {
            if (d[i].equals("x")) {
                reX();
            } else if (d[i].equals("y") ) {
                reY();
            } else if(d[i].equals("z"))
                reZ();
        }
        //完成一系列的旋转操作后输出魔方最近面的颜色
        //开始咱们定义的各个面颜色按前后左右上下分别为1，2，3，4，5，6
        //所以颜色组别里base【0】为空
        String base[]={"","绿","蓝","橙","红","白","黄"};
        int color[]=new int[3];
        color[0]=front[1];//x
        color[1]=right[0];//y
        color[2]=up[3];//z
        for(int i=0;i<color.length;i++){
            System.out.print(base[color[i]]);
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
            Demo6 l=new Demo6();
            l.run(str);
    }

}


